package com.roncoo.education.course.service.api.pc;

import com.roncoo.education.course.common.req.AdvDeleteREQ;
import com.roncoo.education.course.common.req.TagSaveREQ;
import com.roncoo.education.course.service.api.pc.biz.PcApiTagBiz;
import com.roncoo.education.util.base.BaseController;
import com.roncoo.education.util.base.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 * 标签操作
 *
 */
@RestController
@RequestMapping(value = "/course/pc/tag")
@Api(tags = "标签操作")
public class PcApiTagController extends BaseController {

	@Autowired
	private PcApiTagBiz biz;

	/**
	 * 标签添加接口
	 *
	 * @param tagSaveREQ
	 * @return
	 */
	@ApiOperation(value = "标签添加接口", notes = "标签添加接口")
	@RequestMapping(value = "/save", method = RequestMethod.POST)
	public Result<Integer> save(@RequestBody TagSaveREQ tagSaveREQ) {
		return biz.save(tagSaveREQ);
	}

	/**
	 * 标签删除接口
	 *
	 * @param advDeleteREQ
	 * @return
	 */
	@ApiOperation(value = "标签删除接口", notes = "标签删除接口")
	@RequestMapping(value = "/delete", method = RequestMethod.POST)
	public Result<Integer> delete(@RequestBody AdvDeleteREQ advDeleteREQ) {
		return biz.delete(advDeleteREQ);
	}

}
